A virtual machine (VM) is a portion of software that, when executed on appropriate hardware, creates an environment allowing the virtualization of an actual physical computer system (e.g., a server, a mainframe computer, etc.). The actual physical computer system is typically referred to as a “host machine,” and the operating system of the host machine is typically referred to as the “host operating system.” Typically, software on the host machine known as a “hypervisor” (or a “virtual machine monitor”) manages the execution of one or more virtual machines, providing a variety of functions such as virtualizing and allocating resources, context switching among virtual machines, etc. A virtual machine may comprise one or more “virtual processors,” each of which maps, possibly in a many-to-one fashion, to a central processing unit (CPU) of the host machine.
When a guest operating system running within a virtual machine needs to execute a privileged operation (such as an I/O instruction to a physical storage device attached to the host hardware), one way of doing so can be by writing requests to a virtual shared device based on shared memory. The host operating system typically accesses the shared memory to determine whether there are any requests pending from the guest operating system, which is referred to as “polling” the shared device